package Spring.demo;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;


@Service
public class ArticleService {

    @Bean
    public Article getArticle(){

        // 伪代码,假装这是从前端获取到的数据,实际开发不会这样写
        Article article = new Article();
        article.setAuthor("李大牛");
        article.setText("锄禾日当午,飞流直下三千尺");
        article.setCreateTime(LocalDateTime.now());
        return article;
    }

}
